package com.hadluo.qq.client.model;

import javax.swing.*;
import java.awt.Point;
import java.util.Timer;
import java.util.TimerTask;

/**
 * 常用联系人列表项模型类
 * @author hadluo
 */
public class FavoriteListItem {
    private String qqNumber;
    private String nickname;
    private String avatar;
    private String lastMessage;
    private boolean online;
    private long lastMessageTime;
    private boolean hasUnreadMessage; // 添加未读消息标记
    private String signature; // 添加个性签名字段

    public FavoriteListItem() {
        // 默认构造函数
    }

    public FavoriteListItem(String qqNumber, String nickname) {
        this.qqNumber = qqNumber;
        this.nickname = nickname;
        this.hasUnreadMessage = false;
    }

    // Getter和Setter方法
    public String getQqNumber() {
        return qqNumber;
    }

    public void setQqNumber(String qqNumber) {
        this.qqNumber = qqNumber;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getLastMessage() {
        return lastMessage;
    }

    public void setLastMessage(String lastMessage) {
        this.lastMessage = lastMessage;
    }

    public boolean isOnline() {
        return online;
    }

    public void setOnline(boolean online) {
        this.online = online;
    }

    public long getLastMessageTime() {
        return lastMessageTime;
    }

    public void setLastMessageTime(long lastMessageTime) {
        this.lastMessageTime = lastMessageTime;
    }

    public boolean hasUnreadMessage() {
        return hasUnreadMessage;
    }

    public void setHasUnreadMessage(boolean hasUnreadMessage) {
        this.hasUnreadMessage = hasUnreadMessage;
    }

    // 标记消息为已读
    public void markMessageAsRead() {
        this.hasUnreadMessage = false;
    }

    // 标记有新消息
    public void markNewMessage() {
        this.hasUnreadMessage = true;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }
}